package com.wtcrazy.controller;

import com.wtcrazy.entity.Product;
import com.wtcrazy.service.Impl.ProductClassServiceImpl;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/productClass")
public class ProductClassController {
    @Autowired
    private ProductClassServiceImpl productClassService;

    @ApiOperation("得到所有的商品")
    @PostMapping("/getAllProduct")//
    public List<Product> getAllProduct() {
        return productClassService.getAllProduct();
    }
}
